package com.xaicode.auth.domain;

/**
 * 枚举了一些常用API操作码
 */
public enum ResultCode implements IErrorCode {

    /**
     * 操作成功
     **/
    SUCCESS(200, "操作成功"),

    /**
     * 操作失败
     **/
    FAILED(500, "操作失败"),

    VALIDATE_FAILED(500, "参数检验失败"),

    ;

    /**
     * 返回码
     **/
    private final long code;
    /**
     * 返回信息
     **/
    private final String message;

    ResultCode(long code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public long getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
